/* --------------------------------------------------------
 * Copyright (c) aeky , Inc.  All rights reserved.
 * --------------------------------------------------------
 */
package com.aeky.factory.simpleFactory.old;

import com.aeky.factory.baseData.product.Pizza;
import com.aeky.factory.baseData.product.PizzaA;
import com.aeky.factory.baseData.product.PizzaB;
import com.aeky.factory.baseData.product.PizzaC;

/**
 * 披萨商店
 * 
 * @author aeky
 */
public class PizzaStore {

    public Pizza orderPizza(String type) {
        Pizza pizza = null;
        if ("pizzaA".equals(type)) {
            pizza = new PizzaA();// 创建pizzaA
        } else if ("pizzaB".equals(type)) {
            pizza = new PizzaB();// 创建pizzaB
        } else if ("pizzaC".equals(type)) {
            pizza = new PizzaC();// 创建pizzaC
        }
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }
}
